<%--
  Created by IntelliJ IDEA.
  User: 28017
  Date: 2024/7/17
  Time: 21:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div align="center">
    <table border="1">
        <tr>
            <th>id</th>
            <th>name</th>
            <th>sex</th>
            <th>age</th>
        </tr>
        <c:forEach items="${requestScope.pageInfo.list}" var="book">
            <tr>
                <td>${book.id}</td>
                <td style="width: 20%">
                    <img src="${book.cover}">
                </td>
                <td>${book.title}</td>
            </tr>
        </c:forEach>
    </table>
    <p>当前 <span>${pageInfo.pageNum}</span> 页,总 <span >${pageInfo.pages}</span> 页,共 <span th:text="${pageInfo.total}"></span> 条记录</p>
    <a th:href="@{/getAllPerson}">首页</a>
    <a th:href="@{/getAllPerson(pageNum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a>
    <a th:href="@{/getAllPerson(pageNum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a>
    <a th:href="@{/getAllPerson(pageNum=${pageInfo.pages})}">尾页</a>
</div>
<%--${requestScope.userCars}--%>
<%--<table style="width: 80%" border="1" cellspacing="0" align="center">--%>
<%--    <tr>--%>
<%--        <td>用户名</td>--%>
<%--        <td>封面</td>--%>
<%--        <td>标题</td>--%>
<%--        <td>作者</td>--%>
<%--        <td>发布日期</td>--%>
<%--        <td>出版社</td>--%>
<%--        <td style="width: 40%;">描述</td>--%>
<%--        <td>类型</td>--%>
<%--        <td>操作</td>--%>
<%--    </tr>--%>
<%--    <c:forEach items="${requestScope.userCars}" var="n">--%>
<%--        <tr>--%>
<%--            <td>${n.id}</td>--%>
<%--            <td style="width: 20%">--%>
<%--            </td>--%>
<%--            <td>${n.id}</td>--%>
<%--            <td>${n.userName}</td>--%>
<%--            <td>${n.account}</td>--%>
<%--            <td>${n.password}</td>--%>
<%--            <td>${n.phone}</td>--%>
<%--            <td>${n.buycar[1].bookId}</td>--%>
<%--        </tr>--%>
<%--    </c:forEach>--%>
<%--</table>--%>
</body>
</html>
